Skip to content

EIP-7840 Implementation#8042

Merged
siladu merged 17 commits intobesu-eth:mainfrom
siladu:eip-7840
Dec 20, 2024
Merged

EIP-7840 Implementation#8042
siladu merged 17 commits intobesu-eth:mainfrom
siladu:eip-7840

Conversation

@siladu
Copy link
Copy Markdown
Contributor

@siladu siladu commented Dec 17, 2024

PR description

Drive Cancun, Prague and Osaka target and max blobs per block from genesis config:

"blobSchedule": {
  "cancun": {
    "target": 3,
    "max": 6
   },
  "prague": {
    "target": 6,
    "max": 9
  },
  "osaka": {
    "target": 9,
    "max": 12
  }
}

If blobSchedule is missing, use the mainnet default values, i.e. same as config above.

Target is wired into appropriate *GasCalculator implementations
Max is wired into appropriate *TargetingGasLimitCalculator implementations

This PR does not remove EIP-7742 (although overlaps slightly)

This has been tested with a local pectra interop and successfully produced and validated blocks containing up to 9 blobs.

2024-12-19 02:42:22.551+00:00 | vert.x-worker-thread-0 | INFO | AbstractEngineNewPayload | Imported #34 (8c3c2.....3c8e7)| 58 tx| 0 ws| 9 blobs| base fee 17.89 mwei| gas used 2,390,426 ( 8.0%)| exec time 0.010s| mgas/s 239.04| peers: 2

Fixed Issue(s)

#8026
ethereum/EIPs#9129

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Copy link
Copy Markdown
Contributor

@jflo jflo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so far so good, possible bug in osaka setup.

// * @param parentBlobGasUsed blob gas used from the parent
// * @return the new excess blob gas value
// */
// default long computeExcessBlobGas(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assume this all gets deleted after coming out of draft

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
…or each fork

This isolates defaulting to MainnetProtocolSpecs and reduces blast radius for tests

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
- Add asMap for blobSchedule so it appears in admin_nodeInfo
- Prememptively add OsakaTargetingGasLimitCalculator and wire in the max blob count

Add blobschedule to mainnet.json to be explicit, since the code will default to the same values anyway

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu marked this pull request as ready for review December 19, 2024 05:58
@siladu siladu requested review from jflo and macfarla December 19, 2024 05:58
@siladu siladu changed the title EIP-7840 prototype EIP-7840 Implementation Dec 19, 2024
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
siladu and others added 4 commits December 19, 2024 21:18
…net/OsakaTargetingGasLimitCalculator.java

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
…ptions.java

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu enabled auto-merge (squash) December 19, 2024 23:49
@siladu siladu merged commit e830db7 into besu-eth:main Dec 20, 2024
@siladu siladu deleted the eip-7840 branch December 20, 2024 00:15
garyschulte pushed a commit that referenced this pull request Dec 20, 2024
Drive Cancun, Prague and Osaka target and max blobs per block from genesis config.
If blobSchedule is missing, use the mainnet default values.
Target is wired into appropriate *GasCalculator implementations.
Max is wired into appropriate *TargetingGasLimitCalculator implementations.

---------

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
pullurib pushed a commit to pullurib/besu that referenced this pull request Feb 6, 2025
Drive Cancun, Prague and Osaka target and max blobs per block from genesis config.
If blobSchedule is missing, use the mainnet default values.
Target is wired into appropriate *GasCalculator implementations.
Max is wired into appropriate *TargetingGasLimitCalculator implementations.

---------

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants